<?php

include_once 'connection.php';

$province_id = $_POST['province_id'];
//$province_id=4;
$result = mysql_query("SELECT id, name FROM kabkota where province_id=$province_id");
if (mysql_num_rows($result) > 0) {
    while ($obj = mysql_fetch_object($result)) {
        $arr[] = $obj;
    }
}
Echo '{rows:' . json_encode($arr) . '}';
?>
